package area;

import java.io.IOException;
import simulator.House;
import readwrite.Reader;
import java.util.LinkedList;

public class Constructions {
    
    LinkedList <simulator.House> constructions = new LinkedList<simulator.House>();

    public LinkedList<House> getConstructions() {
        return constructions;
    }
    
    public Constructions()
    {
    }
    
    public void AddConstructionFromFile(String _fileName) throws IOException
    {
        Reader readFile = new Reader(_fileName);
        constructions.add(readFile.FromFile());
    }
    
    public static void main(String [] args) throws IOException
    {
        Constructions constract = new Constructions();
        constract.AddConstructionFromFile("Building1.txt");
        constract.AddConstructionFromFile("Building1.txt");
        constract.AddConstructionFromFile("Building1.txt");
        
        for (int i = 0; i < constract.getConstructions().size(); i++)
        {
            System.out.println(constract.getConstructions().get(i).calcHeating());
            
        }
        
        
    }//end of temp test class
    
}//end of Constructions
